<!DOCTYPE html>
<html>
<head>
  <title>SingularityOAuth</title>
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <link href="//cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
  <%= csrf_meta_tags %>
</head>
<body class="register-page">
<div class="register-box">
  <div class="register-logo">
    <a><b class="text-red">Singularity</b><b class="text-blue">Club</b></a>
  </div>

  <div class="register-box-body">
    <% if resource.errors.any? %>
        <div class="alert alert-warning alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
          <h4><i class="icon fa fa-warning"></i>错误!</h4>

          <p><strong>有 <%= resource.errors.count %> 处问题导致无法提交:</strong></p>
          <ul>
            <% resource.errors.full_messages.each do |msg| %>
                <li><%= msg %></li>
            <% end %>
          </ul>
        </div>
    <% end %>

    <p class="login-box-msg">注册</p>

    <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
        <div class="form-group has-feedback">
          <input autofocus="autofocus" type="email" name="user[email]" placeholder="电子邮件*" id="user_email" class="form-control">
          <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
        </div>
        <div class="form-group has-feedback">
          <input autocomplete="off" type="password" placeholder="密码* (至少 <%= @minimum_password_length %> 个字符)" name="user[password]" id="user_password" class="form-control">
          <span class="glyphicon glyphicon-lock form-control-feedback"></span>
        </div>
        <div class="form-group has-feedback">
          <input autocomplete="off" type="password" name="user[password_confirmation]" placeholder="确认密码*" id="user_password_confirmation" class="form-control">
          <span class="glyphicon glyphicon-lock form-control-feedback"></span>
        </div>
        <div class="form-group has-feedback">
          <input autofocus="off" type="text" value="" placeholder="姓名*" name="user[name]" id="user_name" class="form-control">
          <span class="glyphicon glyphicon-user form-control-feedback"></span>
        </div>
        <div class="form-group has-feedback">
          <input autofocus="off" type="text" value="" placeholder="学号" name="user[study_no]" id="user_study_no" class="form-control">
          <span class="glyphicon glyphicon-erase form-control-feedback"></span>
        </div>
        <div class="form-group has-feedback">
          <input autofocus="off" type="tel" value="" placeholder="手机号" name="user[phone]" id="user_phone" class="form-control">
          <span class="glyphicon glyphicon-phone form-control-feedback"></span>
        </div>
        <div class="row">
          <div class="col-xs-8">
          </div>
          <!-- /.col -->
          <div class="col-xs-4">
            <button type="submit" class="btn btn-primary btn-block btn-flat">注册</button>
          </div>
          <!-- /.col -->
        </div>
    <% end %>

    <div class="social-auth-links text-center">
      <p>- OR -</p>
      <a href="<%= new_user_session_path %>" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-sign-in "></i>我有账号</a>
    </div>
  </div>
  <!-- /.form-box -->
</div>
<!-- /.register-box -->


</body>
</html>
